Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting polling interval for httpClient #183

Conversation

phanidevavarapu
Copy link
Contributor

@phanidevavarapu phanidevavarapu commented Jun 29, 2023

Resolves #176

@phanidevavarapu phanidevavarapu requested a review from a team June 29, 2023 17:37

// Optional PollingIntervalMs to configure the polling interval for http client
// if nil uses the default polling interval else uses this value.
PollingIntervalMs *time.Duration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StartSettings contains settings that are all applicable both to httpClient and to wsClient. This new setting will be only applicable to httpClient and it will be confusing.

An alternate approach is to make this a method on httpClient, e.g.:

func (h *httpClient) SetPollingInterval(duration time.Duration)

This can be called anytime to set the next polling interval.

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage: 86.20% and project coverage change: +0.38 🎉

Comparison is base (efddaa2) 76.11% compared to head (3f4cd0f) 76.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #183      +/-   ##
==========================================
+ Coverage   76.11%   76.49%   +0.38%     
==========================================
  Files          24       24              
  Lines        1834     1868      +34     
==========================================
+ Hits         1396     1429      +33     
- Misses        326      327       +1     
  Partials      112      112              
Impacted Files Coverage Δ
client/internal/receivedprocessor.go 84.28% <ø> (ø)
client/internal/wsreceiver.go 91.42% <ø> (ø)
client/types/callbacks.go 66.66% <ø> (ø)
server/httpconnection.go 33.33% <0.00%> (ø)
client/internal/clientcommon.go 79.80% <81.81%> (ø)
client/internal/mockserver.go 82.35% <85.71%> (+0.31%) ⬆️
server/serverimpl.go 58.92% <94.73%> (+0.37%) ⬆️
client/httpclient.go 95.16% <100.00%> (+0.42%) ⬆️
client/internal/httpsender.go 72.22% <100.00%> (+1.25%) ⬆️
client/wsclient.go 86.58% <100.00%> (+1.82%) ⬆️
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tigrannajaryan tigrannajaryan changed the title Changes to allow to set polling interval in start settings Allow setting polling interval for httpClient Jul 7, 2023
@tigrannajaryan tigrannajaryan enabled auto-merge (squash) July 7, 2023 14:46
@tigrannajaryan tigrannajaryan merged commit 3127f49 into open-telemetry:main Jul 7, 2023
@tigrannajaryan
Copy link
Member

Thank you @phanidevavarapu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to set the polling interval for httpClient
2 participants